From: Florian Müllner Date: Mon, 8 Sep 2014 19:50:51 +0000 (+0200) Subject: appDisplay: Only allow ctrl-click for apps that can open new windows X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2165 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=491100c7ee3b87519a432521e888e3070ea08ba0;p=gnome-shell.git appDisplay: Only allow ctrl-click for apps that can open new windows Trust the heuristics in shell_app_can_open_new_window() to get it right more often than not, and add an appropriate check in activate(). This makes the behavior consistent with the dash, e.g. we will try to open a new window (and show the corresponding animation) for apps that don't have a "New window" item in their dash context menu. https://bugzilla.gnome.org/show_bug.cgi?id=736329 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 664096664..8f5c146df 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1687,7 +1687,8 @@ const AppIcon = new Lang.Class({ activate: function (button) { let event = Clutter.get_current_event(); let modifiers = event ? event.get_state() : 0; - let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK && + let openNewWindow = this.app.can_open_new_window () && + modifiers & Clutter.ModifierType.CONTROL_MASK && this.app.state == Shell.AppState.RUNNING || button && button == 2;